Encoding methods for e.g. audio and/or video, typically comprise some type of quantization of signal segments. It is known that unconstrained vector quantization (VQ) is a useful quantization method for grouped samples, i.e. vectors, of a certain length. However, the memory and search complexity constraints have led to the development of structured vector quantizers. Different structures give different trade-offs in terms of search complexity and memory requirements. One such conventional method for structured vector quantization is the gain-shape vector quantization, where the target vector x is represented using a shape vector r and a gain G:
  r  =      x    G  
The concept of gain-shape vector quantization is to quantize a pair of gain and shape components {r, G} instead of directly quantizing the target vector. The gain and shape components are then encoded using a shape quantizer which is tuned for the normalized shape input, and a gain quantizer which handles the dynamics of the signal. This structure is commonly used in audio coding since the division into dynamics and shape, also denoted fine structure, fits well with the perceptual auditory model.
Further, many audio codecs such as IETF Opus and ITU-T G.719 uses a gain-shape vector quantization to encode the spectral coefficients of the target audio signal. Both these codecs use a fixed band structure to partition the spectrum into multiple segments, and there is no adaptation of the band structure to any changes in the target vector.
One issue with gain shape quantization is to find a suitable vector length. Longer vectors give larger variations within the vector such that the shape quantizer needs to handle the dynamics of the signal. Shorter vectors reduce the dynamics within the vector, but may suffer from the fact the lower dimensionality of the shape VQ has less capability to exploit the sample correlation. In addition, the overhead for gain coding increases as the number of partitions increases, which leaves fewer bits for the for the shape coding.